import React, {Component} from 'react'
import {View, Text, StyleSheet} from 'react-native'

export default class Boy extends Component {
  constructor(props) {
    super(props)
    this.state = {
      word: ''
    }
  }
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.text}>i am girl</Text>
        <Text style={styles.text}>我收到了男孩送的{this.props.word}</Text>
        <Text style={styles.text}
              onPress={() => {
                this.props.onCallback('回赠一盒巧克力')
                this.props.navigator.pop()
              }}
        >回馈巧克力</Text>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#f00',
    justifyContent: 'center'
  },
  text: {
    fontSize: 20
  }
})
